/*******************************************************************************
 ** Name: main.d                                                              **
 ** Author: B. Gian James                                                     **
 ** Description:                                                              **
 **                                                                           **
 ** Open Source Initiative (OSI) Approved License: CDDL                       **      **
 **                                                                           **
 ** The contents of this file are subject to the terms of the                 **
 ** Common Development and Distribution License, Version 1.0 only             **
 ** (the "License").  You may not use this file except in compliance          **
 ** with the License.                                                         **
 **                                                                           **
 ** You can find a copy of the license in the LICENSE file within             **
 ** this distribution or at $WIKI/display/ODS/License-software.               **
 ** Software distributed under the License is distributed on an "AS IS"       **
 ** basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.           **
 ** See the License for the specific language governing permissions           **
 ** and limitations under the License.                                        **
 **                                                                           **
 ** When distributing Covered Code, include this CDDL header in each          **
 ** file and include the License file at $INSTALL_DIR/LICENSE.                **   **
 ** If applicable, add the following below this header, with the indicated    **
 ** fields enclosed by brackets "[]" replaced with your own identifying       **
 ** information: Portions Copyright [yyyy] [name of copyright owner]          **
 **                                                                           **
 ** Copyright (c) 2009-2013 Open Design Strategies, LLC                       **
 ** All rights reserved.                                                      **
 ******************************************************************************/
module main;

import std.stdio;
import std.getopt;

immutable VERSION = "0.1.1";


int main(string [] args)
{
	bool bUsage = false;
	string target = "";
	string infile = "";
	string outfile = "";

	getopt(args,
	       "i|ifile", &infile,
		   "o|ofile", &outfile,
	       "t|target", &target,
	       "h|help", &bUsage
	       );
	if (bUsage) {
		usage();
		return 0;
	}

	return 0;
}

void banner()
{
	writeln("sdc SIDEARM Compiler v",VERSION);
	writeln("Copyright 2013 B. Gian James");
	writeln("100% Open Source under OSI-approved CDDL");
	writeln("");
}

void usage()
{
	banner();
	writeln("Usage: sdc [options]");
	writeln("Where [options] are:");
	writeln("-i, --ifile <file>           Code to compile");
	writeln("-o, --ofile <file>           Filename to output");
	writeln("-t, --target <target>        Set output target format");
	writeln("-h, --help                   Print this help message");
}